
import http from '@/utils/request.js';

// 查询通知列表未读数量
export const getUnreadCount = (data) => {
	// return http.get('/repair/user-notice/unread-count', data);
	return http.request({
		url: '/repair/user-notice/unread-count',
		method: 'get',
		data
	});
};
// 查询通知列表-工单
export const getUserMsgPage = (data) => {
	// return http.get('/repair/user-notice/list', data);
	return http.request({
		url: '/msg/page',
		method: 'get',
		data
	});
};
// 查询通知列表
export const getUserNoticeList = (data) => {
	// return http.get('/repair/user-notice/list', data);
	return http.request({
		url: '/repair/user-notice/list',
		method: 'get',
		data
	});
};
// 查询通知列表详情
export const getUserNoticeDetail = (data) => {
	// return http.get('/repair/user-notice/detail', data);
	return http.request({
		url: '/repair/user-notice/detail',
		method: 'get',
		data
	});
};
// 更改单个消息状态为已读
export const setMsgReadOne = (data) => {
	return http.request({
		url: '/msg/' + data.id,
		method: 'put',
		data
	});
};

// 更改全部消息状态为已读  --工单
export const setMsgReadAll = (data) => {
	return http.request({
		url: '/msg/read/all',
		method: 'put',
		data
	});
};

// 更改全部消息状态为已读  --系统
export const setUsernoticeReadAll = (data) => {
	return http.request({
		url: '/repair/user-notice/read/all',
		method: 'put',
		data
	});
};